function columns(vm) {
  const cols = [
    {
      title: '序号',
      dataIndex: 'rowIndex',
      key: 'rowIndex',
      width: 60,
      align: 'center',
      customRender: function (t, r, index) {
        return parseInt(index) + 1
      }
    },
    {
      title: '角色',
      align: 'center',
      dataIndex: 'roleId',
      scopedSlots: {customRender: 'roleId'},
      key: 'roleId'
    },
    {
      title: '批转别名',
      align: 'center',
      dataIndex: 'alias',
      scopedSlots: {customRender: 'alias'},
      key: 'alias'
    },
    {
      dataIndex: 'action',
      align: 'center',
      width: 120,
      slots: { title: 'actionName' },
      scopedSlots: {customRender: 'action'}
    }
  ]
  return cols
}

export default columns